home *** CD-ROM | disk | FTP | other *** search
- package engine.levelData
- {
- import copy.CopyBank;
- import engine.WorldScene;
- import engine.dynamicObjects.*;
-
- public class Level_05 extends LevelData
- {
-
-
- public function Level_05()
- {
- super();
- _goalParameters = new Array();
- }
-
- override public function buildLevel() : *
- {
- var i:* = undefined;
- var rNum:* = undefined;
- var podium:* = undefined;
- var cage:* = undefined;
- var px:Number = NaN;
- var indian:* = undefined;
- var fuelIcon:* = undefined;
- var giantTentacle:* = undefined;
- var goalObj:Object = null;
- var missionObj:Object = null;
- super.buildLevel();
- rNum = Math.random();
- for(i = 0; i < 5; i++)
- {
- rNum = Math.random();
- px = 150 + Math.random() * 100 + i * 200;
- if(rNum < 0.3)
- {
- podium = new Podium("tall");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 568;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- if(rNum >= 0.3 && rNum < 0.6)
- {
- podium = new Podium("med");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 582;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- if(rNum >= 0.6)
- {
- podium = new Podium("short");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 604;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- }
- for(i = 0; i < 5; i++)
- {
- rNum = Math.random();
- px = 1750 + Math.random() * 100 + i * 200;
- if(rNum < 0.3)
- {
- podium = new Podium("tall");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 568;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- if(rNum >= 0.3 && rNum < 0.6)
- {
- podium = new Podium("med");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 582;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- if(rNum >= 0.6)
- {
- podium = new Podium("short");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 604;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- }
- indian = new Indian();
- indian.x = 2900;
- indian.y = 710;
- WorldScene.Instance.GameplayObjects.push(indian);
- WorldScene.Instance.Indians.push(indian);
- indian = new Indian();
- indian.x = 3000;
- indian.y = 710;
- indian.LobMode = true;
- WorldScene.Instance.GameplayObjects.push(indian);
- WorldScene.Instance.Indians.push(indian);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 4000;
- fuelIcon.y = 2000;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 5000;
- fuelIcon.y = 2000;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -Math.PI / 1.35;
- giantTentacle.baseX = 150;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = 350;
- giantTentacle.hiddenY = 1600;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -Math.PI / 1.35;
- giantTentacle.baseX = 2600;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = 2600;
- giantTentacle.hiddenY = 1600;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -Math.PI / 1.1;
- giantTentacle.baseX = 3050;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = 3250;
- giantTentacle.hiddenY = 1600;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -Math.PI / 1.1;
- giantTentacle.baseX = 3450;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = 3250;
- giantTentacle.hiddenY = 1600;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- _missionDescription = CopyBank.Instance.MissionDesc_Cages;
- goalObj = {
- "Type":"Cage",
- "Count":10
- };
- _goalParameters.push(goalObj);
- missionObj = {
- "Description":_missionDescription,
- "BoundsX":_missionBoundsX,
- "BoundsHint":_missionBoundsHint,
- "GoalParamaters":_goalParameters,
- "PrimaryGoalType":"Cages",
- "StartLoc":{
- "x":400,
- "y":400
- }
- };
- WorldScene.Instance.setMissionDetails(missionObj);
- }
- }
- }
-